package gu.sql2java.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.Set;

import com.alibaba.fastjson.JSONObject;

import gu.sql2java.BaseBean;

/**
 * Sql2java runtime (thread)local configuration
 * @author guyadong
 * @since 3.32.6
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD,ElementType.TYPE})
public @interface Sql2javaLocalConfig {
	/**
	 * Define Java bean types that require normalization of 'modified' fields
	 * @see BaseBean#resetModifiedIfEqual()
	 * @see gu.sql2java.config.RuntimeConfig
	 * @see gu.sql2java.json.FastjsonDeserializer#afterDeserialize(JSONObject json, Object instance, Set modifiedReset, Set modifiedSet)
	 * @see gu.sql2java.json.JacksonDeserializer#doDeserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)
	 */
	Class<? extends BaseBean>[] resetModifiedIfEqual() default {};
}
